package ltd.dujiabao.capability.domain.capmng.sync;

import java.util.Collections;
import java.util.Map;

import ltd.dujiabao.capability.domain.capmng.cap.Capability;
import ltd.dujiabao.capability.domain.devmng.DevInfo;

/**
 * @author : DuJiabao
 * @Project : ddd-capability
 * @Time : 2024/4/8 20:58
 * @Desc :
 */
public class SyncCapabilityContext {
    private final Capability capability;
    private final DevInfo devInfo;
    private final Map<String, Object> attributes;

    public SyncCapabilityContext(Capability capability, DevInfo devInfo, Map<String, Object> attributes) {
        this.capability = capability;
        this.devInfo = devInfo;
        this.attributes = attributes;
    }

    public Capability getCapability() {
        return capability;
    }

    public DevInfo getDevInfo() {
        return devInfo;
    }

    public Map<String, Object> getAttributes() {
        return Collections.unmodifiableMap(attributes);
    }

    public Object getAttribute(String key) {
        return attributes.get(key);
    }
}
